Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/zcash-ui #1566 +/- ##
================================================
Coverage ? 22.13%
================================================
Files ? 1158
Lines ? 116530
Branches ? 0
================================================
Hits ? 25797
Misses ? 90733
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
https://download.z.cash/downloads/, through Tor when Tor is enabled, and are used only after their lengths and SHA-256 digests match the ones the Zcash project publishes. The backend's cache does the verification and the atomic install; this PR adds the source and the calls.Stacked on #1565.
Commits
feat: download the Sapling parameters for Zcash sends.Size
11 files, +503/-21: the service (137 lines) and its test (153), the wallet's default resolver and the fetch before the send lock (with a test), one call in each of the three views that open a new or restored Zcash wallet, and a Sapling payment in the end-to-end test with its
SAPLING_PARAMS_DIRoption.How it works
lib/services/zcash_sapling_parameters.dartholds the one service:resolve()returns the verified parameters, downloading them first if they are missing, and callers that arrive during a download share it.ensureInBackground()starts that without waiting and logs a failure.ZcashWallet's default parameter resolver is now that service. A failure surfaces as the existingZcashSaplingParametersUnavailableException, which now says which kind it was: the download (with a Tor variant), files that are not the published ones, or storage.prepareSendfetches the parameters first when a recipient is paid in the Sapling pool, so a download does not hold the send lock that closing or deleting the wallet waits for.ensureInBackground()after opening a Zcash wallet.zcash/sapling_parameters, shared by all Zcash wallets.Known limits
Verification
At this PR's head (
63702f4eb):test/services/zcash_sapling_parameters_test.dart): 5 pass. They cover a download followed by use of the files with no second download, a file that is not the published one being refused and not installed, the message for each kind of failure, concurrent callers sharing one download, and a failed background download.SAPLING_PARAMS_DIRset to a local copy of the files.flutter analyzeon the changed Dart files: no errors. CI's format check on them: clean.flutter testsuite: 1570 passed, 8 skipped, and three of the Firo cache tests named in Add Zcash wallet core integration #1563, which time out in full runs on this machine and pass on their own (17/17).Not run: the download through Tor.